﻿@model HomeTopModel

@if (Model.사용자역할 == BL사용자.GUEST)
{

    <div class="navbar">
        <div class="navbar-inner">
            <div class="container">
                <a class="brand" href="~/">외래교수 채용시스템</a>
                <div class="nav-collapse collapse">
                    <ul class="nav pull-right">
                        <li><a href='@Url.MyAction("Login", "Guest")'>로그인</a></li>
                        <li><a href='@Url.MyAction("Reset", "Guest")'>비밀번호찾기</a></li>
                        <li><a href='@Url.MyAction("Register", "Guest")'>회원가입</a></li>
                    </ul>
                </div>
            </div>
        </div>
    </div>

}
else if (Model.사용자역할 == BL사용자.USER)
{

    <div class="navbar">
        <div class="navbar-inner">
            <div class="container">
                <a class="brand" href="~/">외래교수 채용시스템</a>
                <div class="nav-collapse collapse">
                    <ul class="nav">
                        @게시판목록()
                        <li><a href='@Url.MyAction("Page1", "Resume")'>이력서</a></li>
                        <li><a href='@Url.MyAction("List", "Application")'>강의지원</a></li>
                    </ul>
                    <ul class="nav pull-right">
                        <li><a href='@Url.MyAction("MyPage", "User")'>@Model.사용자이름 정보수정</a></li>
                        <li><a href='@Url.MyAction("Logout", "User")'>로그아웃</a></li>
                    </ul>
                </div>
            </div>
        </div>
    </div>

}
else if (Model.사용자역할 == BL사용자.STAFF || Model.사용자역할 == BL사용자.ADMIN)
{

    <div class="navbar">
        <div class="navbar-inner">
            <div class="container">
                <a class="brand" href="~/">외래교수 채용시스템</a>
                <div class="nav-collapse collapse">
                    <ul class="nav">
                        @게시판목록()
                        <li><a href='@Url.MyAction("List", "Resume")'>이력서목록</a></li>
                        <li><a href='@Url.MyAction("List", "Lecture")'>강의관리</a></li>
                        <li class="dropdown">
                            <a class="dropdown-toggle" data-toggle="dropdown">채용관리<b class="caret"></b></a>
                            <ul class="dropdown-menu">
                                <li><a href='@Url.MyAction("List", "Recruit")'>채용 목록</a></li>
                                <li><a href='@Url.MyAction("ApplicationList", "Resume")'>지원자 목록</a></li>
                                <li><a href='@Url.MyAction("ApproveList", "Application")'>지원자 승인</a></li>
                            </ul>
                        </li>
                        @if (Model.사용자역할 == BL사용자.ADMIN)
                        {
                            <li class="dropdown">
                                <a class="dropdown-toggle" data-toggle="dropdown">시스템관리<b class="caret"></b></a>
                                <ul class="dropdown-menu">
                                    <li><a href='@Url.MyAction("List", "User")'>사용자관리</a></li>
                                    <li><a href='@Url.MyAction("List", "Log")'>로그기록</a></li>
                                </ul>
                            </li>
                        }
                    </ul>
                    <ul class="nav pull-right">
                        <li><a href='@Url.MyAction("MyPage", "User")'>@Model.사용자이름 정보수정</a></li>
                        <li><a href='@Url.MyAction("Logout", "User")'>로그아웃</a></li>
                    </ul>
                </div>
            </div>
        </div>
    </div>

}

@helper 게시판목록() {
    var 목록 = BL게시판.메뉴목록();
    if (목록.Count == 1) {
        <li><a href="@Url.BbsListInit(BL게시판.공지사항ID)">공지사항</a></li>
    } else {
        <li class="dropdown">
            <a class="dropdown-toggle" data-toggle="dropdown">게시판</a>
            <ul class="dropdown-menu">
                @foreach (var 게시판 in 목록) {
                    <li><a href='@Url.BbsListInit(게시판.ID)'>@게시판.제목</a></li>
                }
            </ul>
        </li>
    }
}